{template Public:Admin:header}

<div class="row">
  <div class="col-lg-12">
    <div class="table-toolbar">
      <div class="row">
        <div class="col-lg-12">
          <div class="text-right"> </div>
        </div>
      </div>
      <div class="row">
        <div>
          <form action="{echo U($module.'/'.CONTROLLER_NAME.'/index')}">
            <div class="col-lg-1">
              <input name="uid" type="text" class="form-control" placeholder="用户UID" value="{if !empty($selectarray['uid'])}{echo $selectarray['uid']}{/if}"/>
            </div>
            <div class="col-lg-2">
              <input name="username" type="text"  class="form-control" placeholder="用户名" value="{if !empty($selectarray['username'])}{echo $selectarray['username']}{/if}"/>
            </div>
            <div class="col-lg-1">
              <input name="unionid" type="text" class="form-control" placeholder="推广员UID" value="{if !empty($selectarray['unionid'])}{echo $selectarray['unionid']}{/if}"/>
            </div>
            <div class="col-lg-2">
            <select name="usergroup">
                <option value="">用户组不限</option>
                {foreach $usergrouparr $group}
                      <option value="{echo $group['id']}" {if !empty($selectarray['usergroup'])}{if $selectarray['usergroup']==$group['id']} selected="selected"{/if}{/if}>{echo $group['title']}</option>
                {/foreach}
            </select>
            </div>
            <!--
            <div class="col-lg-4">
            
				<script type="text/javascript" src="{echo AURL}/js/jquery_cityselect.js"></script><script type="text/javascript" src="{echo AURL}/js/foxphp_json_city_all.js"></script>
        
                    <div class="input-group" id="city_1">					  
                                    <select class="prov"></select> 
                                    <select class="city" disabled="disabled"></select>
                                    <select class="dist" disabled="disabled"></select>
                    </div>
        
                                
                                
                <script type="text/javascript">$(function(){$("#city_1").citySelect({prov:$("#ProvId").val(),city:$("#CityId").val(),dist:$("#DistId").val(),nodata:"none"});});</script>
                <input type="hidden" id="ProvId" name="provid" AUTOCOMPLETE="off"  value="{if !empty($_GET["provid"])}{echo intval($_GET["provid"])}{else}1{/if}">
                <input type="hidden" id="CityId" name="cityid" AUTOCOMPLETE="off"  value="{if !empty($_GET["cityid"])}{echo intval($_GET["cityid"])}{else}37{/if}">
                <input type="hidden" id="DistId" name="distid" AUTOCOMPLETE="off"  value="{if !empty($_GET["distid"])}{echo intval($_GET["distid"])}{else}567{/if}">
           </div>
           -->
           
           <div class="col-lg-2">
              <input class="btn btn-default search-button" name="搜索" type="submit" value="搜索" />
              <input type="hidden" name="search" value="1" />
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>

<form method="post" id="SubmitForm" action="{echo U($module.'/'.CONTROLLER_NAME.'/operate')}">
<div case="grid" id="editabledatatable_wrapper" class="dataTables_wrapper form-inline no-footer">
  
  <table id="editabledatatable" class="table table-striped table-hover table-bordered dataTable no-footer" aria-describedby="editabledatatable_info">
    <thead>
      <tr case="row">
        <th class="sorting_disabled" rowspan="1" colspan="1" style="width:38px"><div class="checkbox">
              <label>
                <input type="checkbox" id="CheckAll" style="display:none">
                <span class="text"></span></label>
            </div></th>
            
          {foreach $orderarr $key=>$value}
          <th onClick="window.location.href='{echo U($module.'/'.CONTROLLER_NAME.'/index/sqlorder/'.$key.'/iforder/'.$iforder.'/p/'.$pagenum)}'" tabindex="0" aria-controls="editabledatatable" rowspan="1" colspan="1"  aria-sort="ascending" aria-label="{echo $value['name']}" {if $key==$sqlorder} {if $iforder==2}  class="sorting_desc"{else} class="sorting_asc"{/if}{else} class="sorting"{/if}> {echo $value['name']} </th>
          {/foreach}
          
          
        <th class="sorting_disabled" rowspan="1" colspan="1"> </th>
      </tr>
    </thead>
    <tbody>
    
    {if $list}    
    {foreach $list $value}
    <tr>
      <td style="width:38px"><div class="checkbox">
            <label>
              <input type="checkbox" name="checkbox[]" value="{echo $value['uid']}" style="display:none">
              <span class="text checkbox"></span></label>
          </div></td>
    <td>{echo $value['uid']}</td>
    <td>{echo $value['username']}</td>
    <td>{echo $value['email']}</td>
    <td>{if $value['realname']==1}已认证{else}未认证{/if}</td>
    <td>{echo $value['typename']}</td>
    <td>{echo $value['groupname']}</td>
    <td>{if $value['vipendtime']}{echo FormatDate('Y-m-d',$value['vipendtime'])}{/if}</td>
    <td><span class="color_f60">￥{echo $value['money']/100}</span></td>
    <td><span class="color_f60">￥{echo $value['moneyin']/100}</span></td>
    <td><span class="color_f60">￥{echo $value['moneyout']/100}</span></td>   
    <td>{echo $value['unionid']}</td>
    <td>{echo $value['unionname']}</td>
    <td>{if $value['uniontime']}{echo FormatDate('Y-m-d',$value['uniontime'])}{/if}</td>
    <td>{if $value['top']>0}推荐{/if}</td>
    <td>{echo FormatDate('Y-m-d',$value['dateline'])}</td>
    <td>{echo $value['provname']} {echo $value['cityname']} {echo $value['distname']}</td>
    
      <td class=" "><a class="btn btn-info btn-xs edit" href="{echo U($module.'/'.CONTROLLER_NAME.'/edit/id/'.$value['uid'])}"><i class="fa fa-edit"></i> 编辑</a> <a class="btn btn-danger btn-xs delete" href="javascript:void(0)" onclick="ConfirmDelete({echo $value['uid']},'{echo U($module.'/'.CONTROLLER_NAME.'/delete/id/'.$value['uid'])}')"><i class="fa fa-trash-o"></i> 删除</a></td>
    </tr>
    {/foreach}
    
    {/if}
      </tbody>
    
  </table>
  <div class="row DTTTFooter">
    <div class="col-sm-6">
      <div class="dataTables_info" id="simpledatatable_info" case="alert" aria-live="polite" aria-relevant="all">总共{echo $count}条数据</div>
    </div>
    <div class="col-sm-6">
      <div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
        <ul class="pagination">
          {if $page}{echo $page}{/if}
        </ul>
      </div>
    </div>
  </div>
</div>


  <div class="padding_20 text-center">
 
   <input name="SetTop" type="submit" value="推荐" class="btn btn-default"/> <input name="CloseTop" type="submit" value="取消推荐" class="btn btn-default"/> <input name="Delete" type="submit" id="confirm" value="删除" class="btn btn-danger shiny"/> 

  </div>
  
</form>

{template Public:Admin:footer}